//
//  GlobalHexColorConfig.swift
//  MT
//
//  Created by ooops on 2019/12/12.
//  Copyright © 2019 张强. All rights reserved.
//

import Foundation
import UIKit
import DeviceKit

///  屏幕宽度
public let ScreenWidth : CGFloat = {
    return UIScreen.main.bounds.width
}()

/// 屏幕高度
public let ScreenHeight : CGFloat = {
    return UIScreen.main.bounds.height
}()

/// 当前机型是否是iPhoneX
public let IphoneXSeries : Bool = {
    return Device.realDevice(from: Device.current).isOneOf(Device.allXSeriesDevices)
}()

public let IphoneXorXR : Bool = {
    return Device.realDevice(from: Device.current) == Device.iPhoneX
    || Device.realDevice(from: Device.current) == Device.iPhoneXR
}()

/// 当前机型是否是iPhone
public let IphoneDevice : Bool = {
    return Device.realDevice(from: Device.current).isOneOf(Device.allPhones)
}()

/// 当前机型是否是iPad
public let IPadDevice : Bool = {
    return Device.realDevice(from: Device.current).isOneOf(Device.allPads)
}()

/// 屏幕顶部额外高度， iPhoneX 是24 其他为0
public let ScreenTopExtraOffset : CGFloat = {
    return IphoneXSeries ? 24.0 : 0.0
}()

/// 屏幕第部额外高度， iPhoneX 是34 其他为0
public let ScreenBottomExtraOffset : CGFloat = {
    return IphoneXSeries ? 34.0 : 0.0
}()


/// 导航栏高度
public let NavigationBarHeight : CGFloat = 44.0


/// 状态栏高度
public let StatusBarHeight : CGFloat = {
    return IphoneXSeries ? 44.0 : 20.0
}()


/// tab bar 高度
public let TabBarHeight : CGFloat = {
    return IphoneXSeries ? 83.0 : 49.0
}()

/// 屏幕比
public let ScreenScale : CGFloat = {
    return ScreenWidth / 375.0
}()

///  app 主要子视图距离屏幕边距
public let MainSubviewHorMargin = 20.0

/// app 主要页面背景颜色
public let MainPageBackgroundColor = UIColor.init(hex: 0xFFFFFF)


/// app 子视图主要背景颜色
public let MainSubviewBackgroundColor = UIColor.white


/// app 主要半透明背景颜色
public let MainTranslucentBackgroundColor = UIColor(hex: 0x000000, alpha: 0.6)

/// app 黄色主色
public let MainYellowColor : UIColor = {
    return UIColor(hex: 0xffc000)
}()

/// app 背景颜色
public let MainBackgroundColor: UIColor = {
    //return UIColor(hex: 0x1d1a1a)
    return UIColor(hex: 0xffffff)
}()

/// app 主要分割线颜色
public let MainSeparatorLineColor : UIColor = {
    return UIColor(hex: 0xdfdfdf)
}()

/// app 主要 不可用状态下 文字和按钮颜色
public let MainFontColor : UIColor = {
    return UIColor(hex: 0x1d1a1a)
}()


/// app 列表下副标题的颜色
public let ListViewSubTitleColor : UIColor = {
    return UIColor(hex: 0xF3F3F3)
}()

/// 消息列表下 cell 分隔线的颜色
public let ListViewSeparatorLineColor : UIColor = {
    return UIColor(hex: 0x707070)
}()

/// xF3F3F3Color颜色
public let xF3F3F3Color : UIColor = {
    return UIColor(hex: 0xF3F3F3)
}()
